import {Component} from '@angular/core';

@Component({
  selector: 'app-distribution',
  templateUrl: './distribution.component.html',
  styleUrl: './distribution.component.scss'
})
export class DistributionComponent {
  _chartData: IChartData = {
    num: 115,
    unit: 'kWh',
    desc: '今日用电'
  };
  _powerData: IPowerData[] = [
    {name: '园区', value: 147, color: '#4371CC', unit: 'kWh'}
    , {name: '企业', value: 24, color: '#3DCC6C', unit: 'kWh'}
    // , {name: 'v2g', value: 12, color: '#00FFFF', unit: 'kWh'}
    , {name: '其他', value: 61, color: '#a9278b', unit: 'kWh'}
  ];
}

interface IPowerData {
  name: '园区' | '企业' | '其他';
  value: number;
  color: '#4371CC' | '#3DCC6C' | '#00FFFF' | '#a9278b'
  unit: 'kWh';
}

interface IChartData {
  num: number;
  unit: 'kWh';
  desc: '今日用电';
}
